# Contributor: Nazarov Pavel <genocid@rambler.ru>

pkgname=firefox-spell-ru-en
pkgver=1.0.0.1
pkgrel=9
pkgdesc="Russian+English spellchecker dictionary for Firefox"
arch=(any)
url="http://ftp.mozilla-russia.org/dictionaries/"
license=("GPL")
depends=("firefox")
noextract=(http://ftp.mozilla-russia.org/dictionaries/ru-en_spell_dictionary.xpi)
source=(http://ftp.mozilla-russia.org/dictionaries/ru-en_spell_dictionary.xpi)
md5sums=('74c44634bfc38609ed67c2a85adfa21e')

build() {
  cd $srcdir
  rm $srcdir/*.xpi

  local _dir=$pkgdir/usr/lib/firefox/extensions/ru-en@dictionaries.addons.mozilla.org
  mkdir -p "${_dir}"
  cd "${_dir}"
  sed -i 's#<em:maxVersion>.*</em:maxVersion>#<em:maxVersion>99.*</em:maxVersion>#' $srcdir/install.rdf
  cp -r $srcdir/* "${_dir}"
  find ${_dir} -type f -exec chmod 0644 {} \;
  touch ${_dir}/chrome.manifest
}
